<template>
  <div class="operation-page">
    <el-row :gutter="20">
      <!-- 顶部 -->
      <el-card class="top">
        <div class="topp">
          <div class="medium">
            <label class="label">工单编号:</label>
            <div class="content">
              <input type="text" placeholder="请输入" />
            </div>
          </div>
          <div class="medium">
            <label class="label">工单状态:</label>
            <template>
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </template>
          </div>
          <div class="medium">
            <el-button type="primary" icon="el-icon-search">查询</el-button>
          </div>
        </div>
      </el-card>
      <!-- 核心内容 -->
      <el-card class="bottom">
        <div class="header">
          <el-button type="warning" icon="el-icon-circle-plus-outline"
            >新建</el-button
          >
          <el-button type="danger">工单配置</el-button>
        </div>
        <template>
          <el-table :data="list" style="width: 100%" >
            <el-table-column prop="date" label="序号" width="170">
            </el-table-column>
            <el-table-column prop="name" label="工单编号" width="200">
            </el-table-column>
            <el-table-column prop="name" label="设备编号" width="200">
            </el-table-column>
            <el-table-column prop="name" label="工单类型" width="170">
            </el-table-column>
            <el-table-column prop="name" label="工单方式" width="170">
            </el-table-column>
            <el-table-column prop="name" label="工单状态" width="170">
            </el-table-column>
            <el-table-column prop="name" label="运营人员" width="170">
            </el-table-column>
            <el-table-column prop="name" label="创建日期" width="200">
            </el-table-column>
            <el-table-column prop="name" label="操作" width="170">
            </el-table-column>
          </el-table>
        </template>
      </el-card>
    </el-row>
  </div>
</template>

<script>
import { search } from "@/api/article";
export default {
  data() {
    return {
      list: [],
      options: [
        {
          value: "选项1",
          label: "待办",
        },
        {
          value: "选项2",
          label: "进行",
        },
        {
          value: "选项3",
          label: "取消",
        },
        {
          value: "选项4",
          label: "完成",
        },
      ],
      value: "",
    };
  },
  async created() {
    const res = await search();
    console.log(res);
    this.list = res.currentPageRecords;
    console.log(this.list);
  },
};
</script>

<style lang="scss" scoped>
.operation-page {
  height: 100vh;
  .top {
    height: 80px;
    display: flex;
    padding-left: 17px;
    align-items: center;
    margin-bottom: 20px;
    .topp {
      display: flex;
      .medium {
        margin-left: 10px;
        display: flex;
        margin-right: 10px;
        vertical-align: top;
        .label {
          line-height: 36px;
          float: none;
          display: inline-block;
          text-align: right;
          font-size: 20px;
          color: #606266;
          padding: 0 12px 0 0;
          box-sizing: border-box;
        }
        input {
          height: 36px;
          width: 188px;
          border-radius: 10px;
          margin-left: 8px;
          font-size: 16px;
          color: #d8dde3;
          border: 1px solid #d8dde3;
          padding-left: 20px;
          &:focus{
            border: 1px solid skyblue;
          }
        }
      }
    }
  }
  .bottom {
    height: 700px;
    .header {
      margin-bottom: 30px;
    }
  }
}
</style>
